//AC
//http://poj.org/problem?id=1032
/*
  The idea is to get max multiply value.
  a1 + a2 + a3 + .... + an = N
  a1*a2*...*an = MAXValue
  (There is no duplicated value on the a1..an)

  <1.> if 2 + 3 + 4 + .... + n = N, then output 2...n
  <2.> if 2 + 3 + 4 + .... + n + k = N, k < n + 1 so k = N - sum(2...n)
     <2.1> if k == 1 then (a1..an) = (3,4,....,n,n + 2)
     <2.2> if k >= 2 then delete (n + 1 - k) on the set so (a1...an) = (2...n + 1)  - (n + 1 - k)
  
*/
#include<stdio.h>

int array[50];
void output(int i,int rest);

int main() 
{ 

#ifdef FILEIO
	freopen("in.txt","r",stdin); 
	freopen("out.txt","w",stdout); 
#endif


	int i,n;
	int temp = 0;
	int rest = 0;
	scanf("%d",&n);
	for(i = 0;i<50;i++)
	{
		array[i] = i + 2;
	}

	for(i = 0;i<50;i++)
	{
		temp += array[i];
		if(temp == n) 
		{
			output(i,0);
			break;
		}
		else if(temp > n)
		{
			temp -= array[i];
			rest = (n - temp);
			output(i - 1,rest);
			break;
		}
	}

#ifdef FILEIO
	fclose(stdin);
	fclose(stdout);
#endif  

	return 0; 
}

void output(int index,int rest)
{
	int i = 0;
	int isprint = 0;
	int deleteValue = 0;
	int deleteIndex = 0;
	if(rest == 0) 
	{
		for(i = 0;i <= index;i++)
		{
			printf("%d ",array[i]);
		}
	}
	else
	{
		deleteValue = array[index] + 1 - rest;

		if(deleteValue == 1) 
		{
			for(i = 1;i <= index;i++)
				printf("%d ",array[i]);
			printf("%d ",rest + 2);
		}
		else
		{
			deleteIndex = deleteValue - 2;
			index = index + 1;
			for(i = 0;i <= index;i++)
			{
				if(i == deleteIndex)
					continue;
				printf("%d ",array[i]);
			}
		}
	}
}
